package com.app.common.dataDictionary.PO;

import java.util.*;
import com.css.sword.kernel.base.annotation.*;
import com.css.sword.kernel.base.dataElement.*;
import com.css.sword.kernel.base.exception.SwordBaseCheckedException;

import com.app.common.dataDictionary.DE.DE_W_PRIZE_ID;
import com.app.common.dataDictionary.DE.DE_WEALTHAREA_ID;
import com.app.common.dataDictionary.DE.DE_W_PRIZE_CATEGORY;
import com.app.common.dataDictionary.DE.DE_W_PRIZE_TITLE;
import com.app.common.dataDictionary.DE.DE_W_PRIZE_STARTTIME;
import com.app.common.dataDictionary.DE.DE_W_PRIZE_ENDTIME;
import com.app.common.dataDictionary.DE.DE_W_PRIZE_OPPTIME;
import com.app.common.dataDictionary.DE.DE_W_PRIZE_TOTALNUMBER;
import com.app.common.dataDictionary.DE.DE_W_PRIZE_REMAINNUMBER;
import com.app.common.dataDictionary.DE.DE_W_PRIZE_SYCS;
import com.app.common.dataDictionary.DE.DE_W_PRIZE_NEEDWEALTH;
import com.app.common.dataDictionary.DE.DE_W_PRIZE_IMGID;
import com.app.common.dataDictionary.DE.DE_W_PRIZE_IMGNAME;
import com.app.common.dataDictionary.DE.DE_W_PRIZE_IMGDOMAIN;
import com.app.common.dataDictionary.DE.DE_W_PRIZE_IMGPATH;
import com.app.common.dataDictionary.DE.DE_W_PRIZE_IMGSIZE;
import com.app.common.dataDictionary.DE.DE_W_PRIZE_EXPIRYDATE;
import com.app.common.dataDictionary.DE.DE_W_PRIZE_SFNEW;
import com.app.common.dataDictionary.DE.DE_W_PRIZE_FILEID;
import com.app.common.dataDictionary.DE.DE_W_PRIZE_DETAIL_FJ;
import com.app.common.dataDictionary.DE.DE_W_PRIZE_DETAIL;


/**
 * 财富奖区奖品详情表; InnoDB free: 10240 kB
 */
@PersistObject
public class TWealthareaPrizePO extends AbsPersistObject {
	//private static final long serialVersionUID = 7484363625633825091L;
	private static final long serialVersionUID = 1L;
	private static final Map<String, Integer> fieldIndex = new HashMap<String, Integer>(21);
	private static final BitSet HAS_DEFAULT_VALUE = new BitSet(21);
	
	static{
		HAS_DEFAULT_VALUE.set(9, true);HAS_DEFAULT_VALUE.set(16, true);
		fieldIndex.put("wPrizeId",0);fieldIndex.put("wealthareaId",1);fieldIndex.put("wPrizeCategory",2);fieldIndex.put("wPrizeTitle",3);fieldIndex.put("wPrizeStarttime",4);fieldIndex.put("wPrizeEndtime",5);fieldIndex.put("wPrizeOpptime",6);fieldIndex.put("wPrizeTotalnumber",7);fieldIndex.put("wPrizeRemainnumber",8);fieldIndex.put("wPrizeSycs",9);fieldIndex.put("wPrizeNeedwealth",10);fieldIndex.put("wPrizeImgid",11);fieldIndex.put("wPrizeImgname",12);fieldIndex.put("wPrizeImgdomain",13);fieldIndex.put("wPrizeImgpath",14);fieldIndex.put("wPrizeImgsize",15);fieldIndex.put("wPrizeExpirydate",16);fieldIndex.put("wPrizeSfnew",17);fieldIndex.put("wPrizeFileid",18);fieldIndex.put("wPrizeDetailFj",19);fieldIndex.put("wPrizeDetail",20);
	}
	
	/**
	 * 物理表名
	 */
	public static final String TABLE_NAME = "t_wealtharea_prize";

	/**
	 * 财富奖区奖品id
	 */
	private DE_W_PRIZE_ID wPrizeId = DE_W_PRIZE_ID.getTemplateInstance();

	/**
	 * 所属财富奖区ID
	 */
	private DE_WEALTHAREA_ID wealthareaId = DE_WEALTHAREA_ID.getTemplateInstance();

	/**
	 * 财富奖区奖品类别
	 */
	private DE_W_PRIZE_CATEGORY wPrizeCategory = DE_W_PRIZE_CATEGORY.getTemplateInstance();

	/**
	 * 财富奖区奖品title
	 */
	private DE_W_PRIZE_TITLE wPrizeTitle = DE_W_PRIZE_TITLE.getTemplateInstance();

	/**
	 * 财富奖区奖品开始时间
	 */
	private DE_W_PRIZE_STARTTIME wPrizeStarttime = DE_W_PRIZE_STARTTIME.getTemplateInstance();

	/**
	 * 财富奖区奖品结束时间
	 */
	private DE_W_PRIZE_ENDTIME wPrizeEndtime = DE_W_PRIZE_ENDTIME.getTemplateInstance();

	/**
	 * 财富奖区奖品最后一次操作时间
	 */
	private DE_W_PRIZE_OPPTIME wPrizeOpptime = DE_W_PRIZE_OPPTIME.getTemplateInstance();

	/**
	 * 财富奖区奖品总数量
	 */
	private DE_W_PRIZE_TOTALNUMBER wPrizeTotalnumber = DE_W_PRIZE_TOTALNUMBER.getTemplateInstance();

	/**
	 * 财富奖区奖品剩余数量
	 */
	private DE_W_PRIZE_REMAINNUMBER wPrizeRemainnumber = DE_W_PRIZE_REMAINNUMBER.getTemplateInstance();

	/**
	 * 奖品使用次数
	 */
	private DE_W_PRIZE_SYCS wPrizeSycs = DE_W_PRIZE_SYCS.getTemplateInstance();

	/**
	 * 财富奖区奖品兑换所需财富值
	 */
	private DE_W_PRIZE_NEEDWEALTH wPrizeNeedwealth = DE_W_PRIZE_NEEDWEALTH.getTemplateInstance();

	/**
	 * 财富奖区奖品图片id
	 */
	private DE_W_PRIZE_IMGID wPrizeImgid = DE_W_PRIZE_IMGID.getTemplateInstance();

	/**
	 * 财富奖区奖品图片name
	 */
	private DE_W_PRIZE_IMGNAME wPrizeImgname = DE_W_PRIZE_IMGNAME.getTemplateInstance();

	/**
	 * 财富奖区奖品图片上传主路径
	 */
	private DE_W_PRIZE_IMGDOMAIN wPrizeImgdomain = DE_W_PRIZE_IMGDOMAIN.getTemplateInstance();

	/**
	 * 财富奖区奖品图片路径
	 */
	private DE_W_PRIZE_IMGPATH wPrizeImgpath = DE_W_PRIZE_IMGPATH.getTemplateInstance();

	/**
	 * 财富奖区奖品图片上传大小
	 */
	private DE_W_PRIZE_IMGSIZE wPrizeImgsize = DE_W_PRIZE_IMGSIZE.getTemplateInstance();

	/**
	 * 财富奖区奖品有效天数
	 */
	private DE_W_PRIZE_EXPIRYDATE wPrizeExpirydate = DE_W_PRIZE_EXPIRYDATE.getTemplateInstance();

	/**
	 * 财富奖区奖品是否new
	 */
	private DE_W_PRIZE_SFNEW wPrizeSfnew = DE_W_PRIZE_SFNEW.getTemplateInstance();

	/**
	 * 财富奖区奖品图片附件主键id
	 */
	private DE_W_PRIZE_FILEID wPrizeFileid = DE_W_PRIZE_FILEID.getTemplateInstance();

	/**
	 * 奖品详情大图附件
	 */
	private DE_W_PRIZE_DETAIL_FJ wPrizeDetailFj = DE_W_PRIZE_DETAIL_FJ.getTemplateInstance();

	/**
	 * 财富奖区奖品详情说明
	 */
	private DE_W_PRIZE_DETAIL wPrizeDetail = DE_W_PRIZE_DETAIL.getTemplateInstance();


	public TWealthareaPrizePO(){
		this.insertState = new BitSet(21);
		this.updateState = new BitSet(21);
	}

	
	/**
	 * 获取 "财富奖区奖品id" 值
	 */	
	public DE_W_PRIZE_ID getWPrizeId(){
		return  wPrizeId;
	}
	
	/**
	 * 设置 "财富奖区奖品id" 值
	 */
	public void setWPrizeId(DE_W_PRIZE_ID wPrizeId) {
		if(wPrizeId == null){
			wPrizeId= DE_W_PRIZE_ID.getTemplateInstance();
		}
		recordChangeFlag(0);
		this.wPrizeId = wPrizeId;
	}
	
	/**
	 * 获取 "所属财富奖区ID" 值
	 */	
	public DE_WEALTHAREA_ID getWealthareaId(){
		return  wealthareaId;
	}
	
	/**
	 * 设置 "所属财富奖区ID" 值
	 */
	public void setWealthareaId(DE_WEALTHAREA_ID wealthareaId) {
		if(wealthareaId == null){
			wealthareaId= DE_WEALTHAREA_ID.getTemplateInstance();
		}
		recordChangeFlag(1);
		this.wealthareaId = wealthareaId;
	}
	
	/**
	 * 获取 "财富奖区奖品类别" 值
	 */	
	public DE_W_PRIZE_CATEGORY getWPrizeCategory(){
		return  wPrizeCategory;
	}
	
	/**
	 * 设置 "财富奖区奖品类别" 值
	 */
	public void setWPrizeCategory(DE_W_PRIZE_CATEGORY wPrizeCategory) {
		if(wPrizeCategory == null){
			wPrizeCategory= DE_W_PRIZE_CATEGORY.getTemplateInstance();
		}
		recordChangeFlag(2);
		this.wPrizeCategory = wPrizeCategory;
	}
	
	/**
	 * 获取 "财富奖区奖品title" 值
	 */	
	public DE_W_PRIZE_TITLE getWPrizeTitle(){
		return  wPrizeTitle;
	}
	
	/**
	 * 设置 "财富奖区奖品title" 值
	 */
	public void setWPrizeTitle(DE_W_PRIZE_TITLE wPrizeTitle) {
		if(wPrizeTitle == null){
			wPrizeTitle= DE_W_PRIZE_TITLE.getTemplateInstance();
		}
		recordChangeFlag(3);
		this.wPrizeTitle = wPrizeTitle;
	}
	
	/**
	 * 获取 "财富奖区奖品开始时间" 值
	 */	
	public DE_W_PRIZE_STARTTIME getWPrizeStarttime(){
		return  wPrizeStarttime;
	}
	
	/**
	 * 设置 "财富奖区奖品开始时间" 值
	 */
	public void setWPrizeStarttime(DE_W_PRIZE_STARTTIME wPrizeStarttime) {
		if(wPrizeStarttime == null){
			wPrizeStarttime= DE_W_PRIZE_STARTTIME.getTemplateInstance();
		}
		recordChangeFlag(4);
		this.wPrizeStarttime = wPrizeStarttime;
	}
	
	/**
	 * 获取 "财富奖区奖品结束时间" 值
	 */	
	public DE_W_PRIZE_ENDTIME getWPrizeEndtime(){
		return  wPrizeEndtime;
	}
	
	/**
	 * 设置 "财富奖区奖品结束时间" 值
	 */
	public void setWPrizeEndtime(DE_W_PRIZE_ENDTIME wPrizeEndtime) {
		if(wPrizeEndtime == null){
			wPrizeEndtime= DE_W_PRIZE_ENDTIME.getTemplateInstance();
		}
		recordChangeFlag(5);
		this.wPrizeEndtime = wPrizeEndtime;
	}
	
	/**
	 * 获取 "财富奖区奖品最后一次操作时间" 值
	 */	
	public DE_W_PRIZE_OPPTIME getWPrizeOpptime(){
		return  wPrizeOpptime;
	}
	
	/**
	 * 设置 "财富奖区奖品最后一次操作时间" 值
	 */
	public void setWPrizeOpptime(DE_W_PRIZE_OPPTIME wPrizeOpptime) {
		if(wPrizeOpptime == null){
			wPrizeOpptime= DE_W_PRIZE_OPPTIME.getTemplateInstance();
		}
		recordChangeFlag(6);
		this.wPrizeOpptime = wPrizeOpptime;
	}
	
	/**
	 * 获取 "财富奖区奖品总数量" 值
	 */	
	public DE_W_PRIZE_TOTALNUMBER getWPrizeTotalnumber(){
		return  wPrizeTotalnumber;
	}
	
	/**
	 * 设置 "财富奖区奖品总数量" 值
	 */
	public void setWPrizeTotalnumber(DE_W_PRIZE_TOTALNUMBER wPrizeTotalnumber) {
		if(wPrizeTotalnumber == null){
			wPrizeTotalnumber= DE_W_PRIZE_TOTALNUMBER.getTemplateInstance();
		}
		recordChangeFlag(7);
		this.wPrizeTotalnumber = wPrizeTotalnumber;
	}
	
	/**
	 * 获取 "财富奖区奖品剩余数量" 值
	 */	
	public DE_W_PRIZE_REMAINNUMBER getWPrizeRemainnumber(){
		return  wPrizeRemainnumber;
	}
	
	/**
	 * 设置 "财富奖区奖品剩余数量" 值
	 */
	public void setWPrizeRemainnumber(DE_W_PRIZE_REMAINNUMBER wPrizeRemainnumber) {
		if(wPrizeRemainnumber == null){
			wPrizeRemainnumber= DE_W_PRIZE_REMAINNUMBER.getTemplateInstance();
		}
		recordChangeFlag(8);
		this.wPrizeRemainnumber = wPrizeRemainnumber;
	}
	
	/**
	 * 获取 "奖品使用次数" 值
	 */	
	public DE_W_PRIZE_SYCS getWPrizeSycs(){
		return  wPrizeSycs;
	}
	
	/**
	 * 设置 "奖品使用次数" 值
	 */
	public void setWPrizeSycs(DE_W_PRIZE_SYCS wPrizeSycs) {
		if(wPrizeSycs == null){
			wPrizeSycs= DE_W_PRIZE_SYCS.getTemplateInstance();
		}
		recordChangeFlag(9);
		this.wPrizeSycs = wPrizeSycs;
	}
	
	/**
	 * 获取 "财富奖区奖品兑换所需财富值" 值
	 */	
	public DE_W_PRIZE_NEEDWEALTH getWPrizeNeedwealth(){
		return  wPrizeNeedwealth;
	}
	
	/**
	 * 设置 "财富奖区奖品兑换所需财富值" 值
	 */
	public void setWPrizeNeedwealth(DE_W_PRIZE_NEEDWEALTH wPrizeNeedwealth) {
		if(wPrizeNeedwealth == null){
			wPrizeNeedwealth= DE_W_PRIZE_NEEDWEALTH.getTemplateInstance();
		}
		recordChangeFlag(10);
		this.wPrizeNeedwealth = wPrizeNeedwealth;
	}
	
	/**
	 * 获取 "财富奖区奖品图片id" 值
	 */	
	public DE_W_PRIZE_IMGID getWPrizeImgid(){
		return  wPrizeImgid;
	}
	
	/**
	 * 设置 "财富奖区奖品图片id" 值
	 */
	public void setWPrizeImgid(DE_W_PRIZE_IMGID wPrizeImgid) {
		if(wPrizeImgid == null){
			wPrizeImgid= DE_W_PRIZE_IMGID.getTemplateInstance();
		}
		recordChangeFlag(11);
		this.wPrizeImgid = wPrizeImgid;
	}
	
	/**
	 * 获取 "财富奖区奖品图片name" 值
	 */	
	public DE_W_PRIZE_IMGNAME getWPrizeImgname(){
		return  wPrizeImgname;
	}
	
	/**
	 * 设置 "财富奖区奖品图片name" 值
	 */
	public void setWPrizeImgname(DE_W_PRIZE_IMGNAME wPrizeImgname) {
		if(wPrizeImgname == null){
			wPrizeImgname= DE_W_PRIZE_IMGNAME.getTemplateInstance();
		}
		recordChangeFlag(12);
		this.wPrizeImgname = wPrizeImgname;
	}
	
	/**
	 * 获取 "财富奖区奖品图片上传主路径" 值
	 */	
	public DE_W_PRIZE_IMGDOMAIN getWPrizeImgdomain(){
		return  wPrizeImgdomain;
	}
	
	/**
	 * 设置 "财富奖区奖品图片上传主路径" 值
	 */
	public void setWPrizeImgdomain(DE_W_PRIZE_IMGDOMAIN wPrizeImgdomain) {
		if(wPrizeImgdomain == null){
			wPrizeImgdomain= DE_W_PRIZE_IMGDOMAIN.getTemplateInstance();
		}
		recordChangeFlag(13);
		this.wPrizeImgdomain = wPrizeImgdomain;
	}
	
	/**
	 * 获取 "财富奖区奖品图片路径" 值
	 */	
	public DE_W_PRIZE_IMGPATH getWPrizeImgpath(){
		return  wPrizeImgpath;
	}
	
	/**
	 * 设置 "财富奖区奖品图片路径" 值
	 */
	public void setWPrizeImgpath(DE_W_PRIZE_IMGPATH wPrizeImgpath) {
		if(wPrizeImgpath == null){
			wPrizeImgpath= DE_W_PRIZE_IMGPATH.getTemplateInstance();
		}
		recordChangeFlag(14);
		this.wPrizeImgpath = wPrizeImgpath;
	}
	
	/**
	 * 获取 "财富奖区奖品图片上传大小" 值
	 */	
	public DE_W_PRIZE_IMGSIZE getWPrizeImgsize(){
		return  wPrizeImgsize;
	}
	
	/**
	 * 设置 "财富奖区奖品图片上传大小" 值
	 */
	public void setWPrizeImgsize(DE_W_PRIZE_IMGSIZE wPrizeImgsize) {
		if(wPrizeImgsize == null){
			wPrizeImgsize= DE_W_PRIZE_IMGSIZE.getTemplateInstance();
		}
		recordChangeFlag(15);
		this.wPrizeImgsize = wPrizeImgsize;
	}
	
	/**
	 * 获取 "财富奖区奖品有效天数" 值
	 */	
	public DE_W_PRIZE_EXPIRYDATE getWPrizeExpirydate(){
		return  wPrizeExpirydate;
	}
	
	/**
	 * 设置 "财富奖区奖品有效天数" 值
	 */
	public void setWPrizeExpirydate(DE_W_PRIZE_EXPIRYDATE wPrizeExpirydate) {
		if(wPrizeExpirydate == null){
			wPrizeExpirydate= DE_W_PRIZE_EXPIRYDATE.getTemplateInstance();
		}
		recordChangeFlag(16);
		this.wPrizeExpirydate = wPrizeExpirydate;
	}
	
	/**
	 * 获取 "财富奖区奖品是否new" 值
	 */	
	public DE_W_PRIZE_SFNEW getWPrizeSfnew(){
		return  wPrizeSfnew;
	}
	
	/**
	 * 设置 "财富奖区奖品是否new" 值
	 */
	public void setWPrizeSfnew(DE_W_PRIZE_SFNEW wPrizeSfnew) {
		if(wPrizeSfnew == null){
			wPrizeSfnew= DE_W_PRIZE_SFNEW.getTemplateInstance();
		}
		recordChangeFlag(17);
		this.wPrizeSfnew = wPrizeSfnew;
	}
	
	/**
	 * 获取 "财富奖区奖品图片附件主键id" 值
	 */	
	public DE_W_PRIZE_FILEID getWPrizeFileid(){
		return  wPrizeFileid;
	}
	
	/**
	 * 设置 "财富奖区奖品图片附件主键id" 值
	 */
	public void setWPrizeFileid(DE_W_PRIZE_FILEID wPrizeFileid) {
		if(wPrizeFileid == null){
			wPrizeFileid= DE_W_PRIZE_FILEID.getTemplateInstance();
		}
		recordChangeFlag(18);
		this.wPrizeFileid = wPrizeFileid;
	}
	
	/**
	 * 获取 "奖品详情大图附件" 值
	 */	
	public DE_W_PRIZE_DETAIL_FJ getWPrizeDetailFj(){
		return  wPrizeDetailFj;
	}
	
	/**
	 * 设置 "奖品详情大图附件" 值
	 */
	public void setWPrizeDetailFj(DE_W_PRIZE_DETAIL_FJ wPrizeDetailFj) {
		if(wPrizeDetailFj == null){
			wPrizeDetailFj= DE_W_PRIZE_DETAIL_FJ.getTemplateInstance();
		}
		recordChangeFlag(19);
		this.wPrizeDetailFj = wPrizeDetailFj;
	}
	
	/**
	 * 获取 "财富奖区奖品详情说明" 值
	 */	
	public DE_W_PRIZE_DETAIL getWPrizeDetail(){
		return  wPrizeDetail;
	}
	
	/**
	 * 设置 "财富奖区奖品详情说明" 值
	 */
	public void setWPrizeDetail(DE_W_PRIZE_DETAIL wPrizeDetail) {
		if(wPrizeDetail == null){
			wPrizeDetail= DE_W_PRIZE_DETAIL.getTemplateInstance();
		}
		recordChangeFlag(20);
		this.wPrizeDetail = wPrizeDetail;
	}


	@Override
	public BaseDataElement<?>[] fields(){
		return new BaseDataElement<?>[] {wPrizeId,wealthareaId,wPrizeCategory,wPrizeTitle,wPrizeStarttime,wPrizeEndtime,wPrizeOpptime,wPrizeTotalnumber,wPrizeRemainnumber,wPrizeSycs,wPrizeNeedwealth,wPrizeImgid,wPrizeImgname,wPrizeImgdomain,wPrizeImgpath,wPrizeImgsize,wPrizeExpirydate,wPrizeSfnew,wPrizeFileid,wPrizeDetailFj,wPrizeDetail};
	}
	
	@Override
	public String[] fieldNames() {
		return new String[]{"wPrizeId","wealthareaId","wPrizeCategory","wPrizeTitle","wPrizeStarttime","wPrizeEndtime","wPrizeOpptime","wPrizeTotalnumber","wPrizeRemainnumber","wPrizeSycs","wPrizeNeedwealth","wPrizeImgid","wPrizeImgname","wPrizeImgdomain","wPrizeImgpath","wPrizeImgsize","wPrizeExpirydate","wPrizeSfnew","wPrizeFileid","wPrizeDetailFj","wPrizeDetail"};
	}
	
	@Override
	public BaseDataElement<?> getFieldValue(String fieldName)  {
		final Integer index = fieldIndex.get(fieldName);
		if (index == null) {
			throw new IllegalArgumentException("PO对象中没有" + fieldName + "字段");
		}
		switch (index) {
		case 0 : return wPrizeId;
		case 1 : return wealthareaId;
		case 2 : return wPrizeCategory;
		case 3 : return wPrizeTitle;
		case 4 : return wPrizeStarttime;
		case 5 : return wPrizeEndtime;
		case 6 : return wPrizeOpptime;
		case 7 : return wPrizeTotalnumber;
		case 8 : return wPrizeRemainnumber;
		case 9 : return wPrizeSycs;
		case 10 : return wPrizeNeedwealth;
		case 11 : return wPrizeImgid;
		case 12 : return wPrizeImgname;
		case 13 : return wPrizeImgdomain;
		case 14 : return wPrizeImgpath;
		case 15 : return wPrizeImgsize;
		case 16 : return wPrizeExpirydate;
		case 17 : return wPrizeSfnew;
		case 18 : return wPrizeFileid;
		case 19 : return wPrizeDetailFj;
		case 20 : return wPrizeDetail;
 
		default:
			throw new IllegalArgumentException("PO对象中没有" + fieldName + "字段");
		}
	}
	
	@Override
	public TWealthareaPrizePO setFieldValue(String fieldName, Object fieldValue) throws SwordBaseCheckedException {
		if (fieldValue != null && !(fieldValue instanceof BaseDataElement<?>)) {
			throw new SwordBaseCheckedException("字段值类型不是DataElelement子类型");
		}

		final Integer index = fieldIndex.get(fieldName);
		if (index == null) {
			throw new SwordBaseCheckedException("PO对象中没有" + fieldName + "字段");
		}

		switch (index) {

				case 0 : {
					if (fieldValue == null) {
						setWPrizeId(null);
					} else {
						setWPrizeId((DE_W_PRIZE_ID) fieldValue);
					}
					return this;
				}
				
				case 1 : {
					if (fieldValue == null) {
						setWealthareaId(null);
					} else {
						setWealthareaId((DE_WEALTHAREA_ID) fieldValue);
					}
					return this;
				}
				
				case 2 : {
					if (fieldValue == null) {
						setWPrizeCategory(null);
					} else {
						setWPrizeCategory((DE_W_PRIZE_CATEGORY) fieldValue);
					}
					return this;
				}
				
				case 3 : {
					if (fieldValue == null) {
						setWPrizeTitle(null);
					} else {
						setWPrizeTitle((DE_W_PRIZE_TITLE) fieldValue);
					}
					return this;
				}
				
				case 4 : {
					if (fieldValue == null) {
						setWPrizeStarttime(null);
					} else {
						setWPrizeStarttime((DE_W_PRIZE_STARTTIME) fieldValue);
					}
					return this;
				}
				
				case 5 : {
					if (fieldValue == null) {
						setWPrizeEndtime(null);
					} else {
						setWPrizeEndtime((DE_W_PRIZE_ENDTIME) fieldValue);
					}
					return this;
				}
				
				case 6 : {
					if (fieldValue == null) {
						setWPrizeOpptime(null);
					} else {
						setWPrizeOpptime((DE_W_PRIZE_OPPTIME) fieldValue);
					}
					return this;
				}
				
				case 7 : {
					if (fieldValue == null) {
						setWPrizeTotalnumber(null);
					} else {
						setWPrizeTotalnumber((DE_W_PRIZE_TOTALNUMBER) fieldValue);
					}
					return this;
				}
				
				case 8 : {
					if (fieldValue == null) {
						setWPrizeRemainnumber(null);
					} else {
						setWPrizeRemainnumber((DE_W_PRIZE_REMAINNUMBER) fieldValue);
					}
					return this;
				}
				
				case 9 : {
					if (fieldValue == null) {
						setWPrizeSycs(null);
					} else {
						setWPrizeSycs((DE_W_PRIZE_SYCS) fieldValue);
					}
					return this;
				}
				
				case 10 : {
					if (fieldValue == null) {
						setWPrizeNeedwealth(null);
					} else {
						setWPrizeNeedwealth((DE_W_PRIZE_NEEDWEALTH) fieldValue);
					}
					return this;
				}
				
				case 11 : {
					if (fieldValue == null) {
						setWPrizeImgid(null);
					} else {
						setWPrizeImgid((DE_W_PRIZE_IMGID) fieldValue);
					}
					return this;
				}
				
				case 12 : {
					if (fieldValue == null) {
						setWPrizeImgname(null);
					} else {
						setWPrizeImgname((DE_W_PRIZE_IMGNAME) fieldValue);
					}
					return this;
				}
				
				case 13 : {
					if (fieldValue == null) {
						setWPrizeImgdomain(null);
					} else {
						setWPrizeImgdomain((DE_W_PRIZE_IMGDOMAIN) fieldValue);
					}
					return this;
				}
				
				case 14 : {
					if (fieldValue == null) {
						setWPrizeImgpath(null);
					} else {
						setWPrizeImgpath((DE_W_PRIZE_IMGPATH) fieldValue);
					}
					return this;
				}
				
				case 15 : {
					if (fieldValue == null) {
						setWPrizeImgsize(null);
					} else {
						setWPrizeImgsize((DE_W_PRIZE_IMGSIZE) fieldValue);
					}
					return this;
				}
				
				case 16 : {
					if (fieldValue == null) {
						setWPrizeExpirydate(null);
					} else {
						setWPrizeExpirydate((DE_W_PRIZE_EXPIRYDATE) fieldValue);
					}
					return this;
				}
				
				case 17 : {
					if (fieldValue == null) {
						setWPrizeSfnew(null);
					} else {
						setWPrizeSfnew((DE_W_PRIZE_SFNEW) fieldValue);
					}
					return this;
				}
				
				case 18 : {
					if (fieldValue == null) {
						setWPrizeFileid(null);
					} else {
						setWPrizeFileid((DE_W_PRIZE_FILEID) fieldValue);
					}
					return this;
				}
				
				case 19 : {
					if (fieldValue == null) {
						setWPrizeDetailFj(null);
					} else {
						setWPrizeDetailFj((DE_W_PRIZE_DETAIL_FJ) fieldValue);
					}
					return this;
				}
				
				case 20 : {
					if (fieldValue == null) {
						setWPrizeDetail(null);
					} else {
						setWPrizeDetail((DE_W_PRIZE_DETAIL) fieldValue);
					}
					return this;
				}
				
		default:
			throw new SwordBaseCheckedException("PO对象中没有" + fieldName + "字段");
		}
	
	}

	@Override
	protected TWealthareaPrizePO clone() {
		TWealthareaPrizePO t = new TWealthareaPrizePO();
		
		t.setWPrizeId(this.wPrizeId);
		t.setWealthareaId(this.wealthareaId);
		t.setWPrizeCategory(this.wPrizeCategory);
		t.setWPrizeTitle(this.wPrizeTitle);
		t.setWPrizeStarttime(this.wPrizeStarttime);
		t.setWPrizeEndtime(this.wPrizeEndtime);
		t.setWPrizeOpptime(this.wPrizeOpptime);
		t.setWPrizeTotalnumber(this.wPrizeTotalnumber);
		t.setWPrizeRemainnumber(this.wPrizeRemainnumber);
		t.setWPrizeSycs(this.wPrizeSycs);
		t.setWPrizeNeedwealth(this.wPrizeNeedwealth);
		t.setWPrizeImgid(this.wPrizeImgid);
		t.setWPrizeImgname(this.wPrizeImgname);
		t.setWPrizeImgdomain(this.wPrizeImgdomain);
		t.setWPrizeImgpath(this.wPrizeImgpath);
		t.setWPrizeImgsize(this.wPrizeImgsize);
		t.setWPrizeExpirydate(this.wPrizeExpirydate);
		t.setWPrizeSfnew(this.wPrizeSfnew);
		t.setWPrizeFileid(this.wPrizeFileid);
		t.setWPrizeDetailFj(this.wPrizeDetailFj);
		t.setWPrizeDetail(this.wPrizeDetail);

		return t;
	}

	@Override
	public TWealthareaPrizePO loadMap(Map<String, Object> dataMap) throws SwordBaseCheckedException {
		Object value = null;

		if(dataMap.containsKey("wPrizeId")){
			value = dataMap.get("wPrizeId");
			
			if (value == null) {
				this.setWPrizeId(null);
			} else {
				if (value instanceof DE_W_PRIZE_ID) {
					this.setWPrizeId((DE_W_PRIZE_ID) value);
				}
			    else {
					this.setWPrizeId(new DE_W_PRIZE_ID(value.toString()));
				}
			}
		}

		if(dataMap.containsKey("wealthareaId")){
			value = dataMap.get("wealthareaId");
			
			if (value == null) {
				this.setWealthareaId(null);
			} else {
				if (value instanceof DE_WEALTHAREA_ID) {
					this.setWealthareaId((DE_WEALTHAREA_ID) value);
				}
			    else {
					this.setWealthareaId(new DE_WEALTHAREA_ID(value.toString()));
				}
			}
		}

		if(dataMap.containsKey("wPrizeCategory")){
			value = dataMap.get("wPrizeCategory");
			
			if (value == null) {
				this.setWPrizeCategory(null);
			} else {
				if (value instanceof DE_W_PRIZE_CATEGORY) {
					this.setWPrizeCategory((DE_W_PRIZE_CATEGORY) value);
				}
			    else {
					this.setWPrizeCategory(new DE_W_PRIZE_CATEGORY(value.toString()));
				}
			}
		}

		if(dataMap.containsKey("wPrizeTitle")){
			value = dataMap.get("wPrizeTitle");
			
			if (value == null) {
				this.setWPrizeTitle(null);
			} else {
				if (value instanceof DE_W_PRIZE_TITLE) {
					this.setWPrizeTitle((DE_W_PRIZE_TITLE) value);
				}
			    else {
					this.setWPrizeTitle(new DE_W_PRIZE_TITLE(value.toString()));
				}
			}
		}

		if(dataMap.containsKey("wPrizeStarttime")){
			value = dataMap.get("wPrizeStarttime");
			
			if (value == null) {
				this.setWPrizeStarttime(null);
			} else {
				if (value instanceof DE_W_PRIZE_STARTTIME) {
					this.setWPrizeStarttime((DE_W_PRIZE_STARTTIME) value);
				}
				else if(value instanceof java.util.Date){
					this.setWPrizeStarttime(new DE_W_PRIZE_STARTTIME((java.util.Date)value));
				}
			    else {
					this.setWPrizeStarttime(new DE_W_PRIZE_STARTTIME(value.toString()));
				}
			}
		}

		if(dataMap.containsKey("wPrizeEndtime")){
			value = dataMap.get("wPrizeEndtime");
			
			if (value == null) {
				this.setWPrizeEndtime(null);
			} else {
				if (value instanceof DE_W_PRIZE_ENDTIME) {
					this.setWPrizeEndtime((DE_W_PRIZE_ENDTIME) value);
				}
				else if(value instanceof java.util.Date){
					this.setWPrizeEndtime(new DE_W_PRIZE_ENDTIME((java.util.Date)value));
				}
			    else {
					this.setWPrizeEndtime(new DE_W_PRIZE_ENDTIME(value.toString()));
				}
			}
		}

		if(dataMap.containsKey("wPrizeOpptime")){
			value = dataMap.get("wPrizeOpptime");
			
			if (value == null) {
				this.setWPrizeOpptime(null);
			} else {
				if (value instanceof DE_W_PRIZE_OPPTIME) {
					this.setWPrizeOpptime((DE_W_PRIZE_OPPTIME) value);
				}
				else if(value instanceof java.util.Date){
					this.setWPrizeOpptime(new DE_W_PRIZE_OPPTIME((java.util.Date)value));
				}
			    else {
					this.setWPrizeOpptime(new DE_W_PRIZE_OPPTIME(value.toString()));
				}
			}
		}

		if(dataMap.containsKey("wPrizeTotalnumber")){
			value = dataMap.get("wPrizeTotalnumber");
			
			if (value == null) {
				this.setWPrizeTotalnumber(null);
			} else {
				if (value instanceof DE_W_PRIZE_TOTALNUMBER) {
					this.setWPrizeTotalnumber((DE_W_PRIZE_TOTALNUMBER) value);
				}
			    else {
					this.setWPrizeTotalnumber(new DE_W_PRIZE_TOTALNUMBER(value.toString()));
				}
			}
		}

		if(dataMap.containsKey("wPrizeRemainnumber")){
			value = dataMap.get("wPrizeRemainnumber");
			
			if (value == null) {
				this.setWPrizeRemainnumber(null);
			} else {
				if (value instanceof DE_W_PRIZE_REMAINNUMBER) {
					this.setWPrizeRemainnumber((DE_W_PRIZE_REMAINNUMBER) value);
				}
			    else {
					this.setWPrizeRemainnumber(new DE_W_PRIZE_REMAINNUMBER(value.toString()));
				}
			}
		}

		if(dataMap.containsKey("wPrizeSycs")){
			value = dataMap.get("wPrizeSycs");
			
			if (value == null) {
				this.setWPrizeSycs(null);
			} else {
				if (value instanceof DE_W_PRIZE_SYCS) {
					this.setWPrizeSycs((DE_W_PRIZE_SYCS) value);
				}
			    else {
					this.setWPrizeSycs(new DE_W_PRIZE_SYCS(value.toString()));
				}
			}
		}

		if(dataMap.containsKey("wPrizeNeedwealth")){
			value = dataMap.get("wPrizeNeedwealth");
			
			if (value == null) {
				this.setWPrizeNeedwealth(null);
			} else {
				if (value instanceof DE_W_PRIZE_NEEDWEALTH) {
					this.setWPrizeNeedwealth((DE_W_PRIZE_NEEDWEALTH) value);
				}
			    else {
					this.setWPrizeNeedwealth(new DE_W_PRIZE_NEEDWEALTH(value.toString()));
				}
			}
		}

		if(dataMap.containsKey("wPrizeImgid")){
			value = dataMap.get("wPrizeImgid");
			
			if (value == null) {
				this.setWPrizeImgid(null);
			} else {
				if (value instanceof DE_W_PRIZE_IMGID) {
					this.setWPrizeImgid((DE_W_PRIZE_IMGID) value);
				}
			    else {
					this.setWPrizeImgid(new DE_W_PRIZE_IMGID(value.toString()));
				}
			}
		}

		if(dataMap.containsKey("wPrizeImgname")){
			value = dataMap.get("wPrizeImgname");
			
			if (value == null) {
				this.setWPrizeImgname(null);
			} else {
				if (value instanceof DE_W_PRIZE_IMGNAME) {
					this.setWPrizeImgname((DE_W_PRIZE_IMGNAME) value);
				}
			    else {
					this.setWPrizeImgname(new DE_W_PRIZE_IMGNAME(value.toString()));
				}
			}
		}

		if(dataMap.containsKey("wPrizeImgdomain")){
			value = dataMap.get("wPrizeImgdomain");
			
			if (value == null) {
				this.setWPrizeImgdomain(null);
			} else {
				if (value instanceof DE_W_PRIZE_IMGDOMAIN) {
					this.setWPrizeImgdomain((DE_W_PRIZE_IMGDOMAIN) value);
				}
			    else {
					this.setWPrizeImgdomain(new DE_W_PRIZE_IMGDOMAIN(value.toString()));
				}
			}
		}

		if(dataMap.containsKey("wPrizeImgpath")){
			value = dataMap.get("wPrizeImgpath");
			
			if (value == null) {
				this.setWPrizeImgpath(null);
			} else {
				if (value instanceof DE_W_PRIZE_IMGPATH) {
					this.setWPrizeImgpath((DE_W_PRIZE_IMGPATH) value);
				}
			    else {
					this.setWPrizeImgpath(new DE_W_PRIZE_IMGPATH(value.toString()));
				}
			}
		}

		if(dataMap.containsKey("wPrizeImgsize")){
			value = dataMap.get("wPrizeImgsize");
			
			if (value == null) {
				this.setWPrizeImgsize(null);
			} else {
				if (value instanceof DE_W_PRIZE_IMGSIZE) {
					this.setWPrizeImgsize((DE_W_PRIZE_IMGSIZE) value);
				}
			    else {
					this.setWPrizeImgsize(new DE_W_PRIZE_IMGSIZE(value.toString()));
				}
			}
		}

		if(dataMap.containsKey("wPrizeExpirydate")){
			value = dataMap.get("wPrizeExpirydate");
			
			if (value == null) {
				this.setWPrizeExpirydate(null);
			} else {
				if (value instanceof DE_W_PRIZE_EXPIRYDATE) {
					this.setWPrizeExpirydate((DE_W_PRIZE_EXPIRYDATE) value);
				}
			    else {
					this.setWPrizeExpirydate(new DE_W_PRIZE_EXPIRYDATE(value.toString()));
				}
			}
		}

		if(dataMap.containsKey("wPrizeSfnew")){
			value = dataMap.get("wPrizeSfnew");
			
			if (value == null) {
				this.setWPrizeSfnew(null);
			} else {
				if (value instanceof DE_W_PRIZE_SFNEW) {
					this.setWPrizeSfnew((DE_W_PRIZE_SFNEW) value);
				}
			    else {
					this.setWPrizeSfnew(new DE_W_PRIZE_SFNEW(value.toString()));
				}
			}
		}

		if(dataMap.containsKey("wPrizeFileid")){
			value = dataMap.get("wPrizeFileid");
			
			if (value == null) {
				this.setWPrizeFileid(null);
			} else {
				if (value instanceof DE_W_PRIZE_FILEID) {
					this.setWPrizeFileid((DE_W_PRIZE_FILEID) value);
				}
			    else {
					this.setWPrizeFileid(new DE_W_PRIZE_FILEID(value.toString()));
				}
			}
		}

		if(dataMap.containsKey("wPrizeDetailFj")){
			value = dataMap.get("wPrizeDetailFj");
			
			if (value == null) {
				this.setWPrizeDetailFj(null);
			} else {
				if (value instanceof DE_W_PRIZE_DETAIL_FJ) {
					this.setWPrizeDetailFj((DE_W_PRIZE_DETAIL_FJ) value);
				}
			    else {
					this.setWPrizeDetailFj(new DE_W_PRIZE_DETAIL_FJ(value.toString()));
				}
			}
		}

		if(dataMap.containsKey("wPrizeDetail")){
			value = dataMap.get("wPrizeDetail");
			
			if (value == null) {
				this.setWPrizeDetail(null);
			} else {
				if (value instanceof DE_W_PRIZE_DETAIL) {
					this.setWPrizeDetail((DE_W_PRIZE_DETAIL) value);
				}
			    else {
					this.setWPrizeDetail(new DE_W_PRIZE_DETAIL(value.toString()));
				}
			}
		}

		return this;
	}
	
	@Override
	public Map<String,Object> toMap() {
		Map<String,Object> dataMap = new HashMap<String,Object>();

		dataMap.put("wPrizeId", wPrizeId);
		dataMap.put("wealthareaId", wealthareaId);
		dataMap.put("wPrizeCategory", wPrizeCategory);
		dataMap.put("wPrizeTitle", wPrizeTitle);
		dataMap.put("wPrizeStarttime", wPrizeStarttime);
		dataMap.put("wPrizeEndtime", wPrizeEndtime);
		dataMap.put("wPrizeOpptime", wPrizeOpptime);
		dataMap.put("wPrizeTotalnumber", wPrizeTotalnumber);
		dataMap.put("wPrizeRemainnumber", wPrizeRemainnumber);
		dataMap.put("wPrizeSycs", wPrizeSycs);
		dataMap.put("wPrizeNeedwealth", wPrizeNeedwealth);
		dataMap.put("wPrizeImgid", wPrizeImgid);
		dataMap.put("wPrizeImgname", wPrizeImgname);
		dataMap.put("wPrizeImgdomain", wPrizeImgdomain);
		dataMap.put("wPrizeImgpath", wPrizeImgpath);
		dataMap.put("wPrizeImgsize", wPrizeImgsize);
		dataMap.put("wPrizeExpirydate", wPrizeExpirydate);
		dataMap.put("wPrizeSfnew", wPrizeSfnew);
		dataMap.put("wPrizeFileid", wPrizeFileid);
		dataMap.put("wPrizeDetailFj", wPrizeDetailFj);
		dataMap.put("wPrizeDetail", wPrizeDetail);
		
		return dataMap;
	}
	
	@Override
	public Map<String,Object> toMapWithDEValue() {
		Map<String,Object> dataMap = new HashMap<String,Object>();

		dataMap.put("wPrizeId", (wPrizeId==null?null:wPrizeId.value));
		dataMap.put("wealthareaId", (wealthareaId==null?null:wealthareaId.value));
		dataMap.put("wPrizeCategory", (wPrizeCategory==null?null:wPrizeCategory.value));
		dataMap.put("wPrizeTitle", (wPrizeTitle==null?null:wPrizeTitle.value));
		dataMap.put("wPrizeStarttime", (wPrizeStarttime==null?null:wPrizeStarttime.value));
		dataMap.put("wPrizeEndtime", (wPrizeEndtime==null?null:wPrizeEndtime.value));
		dataMap.put("wPrizeOpptime", (wPrizeOpptime==null?null:wPrizeOpptime.value));
		dataMap.put("wPrizeTotalnumber", (wPrizeTotalnumber==null?null:wPrizeTotalnumber.value));
		dataMap.put("wPrizeRemainnumber", (wPrizeRemainnumber==null?null:wPrizeRemainnumber.value));
		dataMap.put("wPrizeSycs", (wPrizeSycs==null?null:wPrizeSycs.value));
		dataMap.put("wPrizeNeedwealth", (wPrizeNeedwealth==null?null:wPrizeNeedwealth.value));
		dataMap.put("wPrizeImgid", (wPrizeImgid==null?null:wPrizeImgid.value));
		dataMap.put("wPrizeImgname", (wPrizeImgname==null?null:wPrizeImgname.value));
		dataMap.put("wPrizeImgdomain", (wPrizeImgdomain==null?null:wPrizeImgdomain.value));
		dataMap.put("wPrizeImgpath", (wPrizeImgpath==null?null:wPrizeImgpath.value));
		dataMap.put("wPrizeImgsize", (wPrizeImgsize==null?null:wPrizeImgsize.value));
		dataMap.put("wPrizeExpirydate", (wPrizeExpirydate==null?null:wPrizeExpirydate.value));
		dataMap.put("wPrizeSfnew", (wPrizeSfnew==null?null:wPrizeSfnew.value));
		dataMap.put("wPrizeFileid", (wPrizeFileid==null?null:wPrizeFileid.value));
		dataMap.put("wPrizeDetailFj", (wPrizeDetailFj==null?null:wPrizeDetailFj.value));
		dataMap.put("wPrizeDetail", (wPrizeDetail==null?null:wPrizeDetail.value));
		
		return dataMap;
	}
	
	@Override
	public TWealthareaPrizePO newInstance() {
		return new TWealthareaPrizePO();
	}
	
	@Override
	public String getTableName(){
		return TABLE_NAME;
	}
	
	@Override
	public BaseDataElement<?>[] getPrimaryKey() {
		return new BaseDataElement<?>[]{wPrizeId};
	}

	@Override
	public void checkNotNull(byte sqlType) throws SwordBaseCheckedException {
		StringBuilder errorMsg = new StringBuilder();
		// insert
		if (sqlType == 0) {
				//只校验不可为空但又没有默认值的字段
				if (wPrizeId.value == null && !HAS_DEFAULT_VALUE.get(0)) {
					errorMsg.append("字段wPrizeId不允许为空\n");
				}
				if (wealthareaId.value == null && !HAS_DEFAULT_VALUE.get(1)) {
					errorMsg.append("字段wealthareaId不允许为空\n");
				}
				if (wPrizeCategory.value == null && !HAS_DEFAULT_VALUE.get(2)) {
					errorMsg.append("字段wPrizeCategory不允许为空\n");
				}

		}
		// update
		else if (sqlType == 1) {
		if (updateState.get(0) && wPrizeId.value == null) {
			errorMsg.append("字段wPrizeId不允许为空\n");
		}
		if (updateState.get(1) && wealthareaId.value == null) {
			errorMsg.append("字段wealthareaId不允许为空\n");
		}
		if (updateState.get(2) && wPrizeCategory.value == null) {
			errorMsg.append("字段wPrizeCategory不允许为空\n");
		}

		}
		
		if (errorMsg.length() > 0) {
			errorMsg.setLength(errorMsg.length() - 1);
			throw new SwordBaseCheckedException(errorMsg.toString());
		}
	}

	@Override
	public void updateLrrq(DateDE lrrq) {
	}

	@Override
	public void updateXgrq(DateDE xgrq) {
	}

	@Override
	public String toString() {
		StringBuilder str = new StringBuilder();
		str.append("wPrizeId:").append(wPrizeId.value!=null?wPrizeId:"").append(" ").append("wealthareaId:").append(wealthareaId.value!=null?wealthareaId:"").append(" ").append("wPrizeCategory:").append(wPrizeCategory.value!=null?wPrizeCategory:"").append(" ").append("wPrizeTitle:").append(wPrizeTitle.value!=null?wPrizeTitle:"").append(" ").append("wPrizeStarttime:").append(wPrizeStarttime.value!=null?wPrizeStarttime:"").append(" ").append("wPrizeEndtime:").append(wPrizeEndtime.value!=null?wPrizeEndtime:"").append(" ").append("wPrizeOpptime:").append(wPrizeOpptime.value!=null?wPrizeOpptime:"").append(" ").append("wPrizeTotalnumber:").append(wPrizeTotalnumber.value!=null?wPrizeTotalnumber:"").append(" ").append("wPrizeRemainnumber:").append(wPrizeRemainnumber.value!=null?wPrizeRemainnumber:"").append(" ").append("wPrizeSycs:").append(wPrizeSycs.value!=null?wPrizeSycs:"").append(" ").append("wPrizeNeedwealth:").append(wPrizeNeedwealth.value!=null?wPrizeNeedwealth:"").append(" ").append("wPrizeImgid:").append(wPrizeImgid.value!=null?wPrizeImgid:"").append(" ").append("wPrizeImgname:").append(wPrizeImgname.value!=null?wPrizeImgname:"").append(" ").append("wPrizeImgdomain:").append(wPrizeImgdomain.value!=null?wPrizeImgdomain:"").append(" ").append("wPrizeImgpath:").append(wPrizeImgpath.value!=null?wPrizeImgpath:"").append(" ").append("wPrizeImgsize:").append(wPrizeImgsize.value!=null?wPrizeImgsize:"").append(" ").append("wPrizeExpirydate:").append(wPrizeExpirydate.value!=null?wPrizeExpirydate:"").append(" ").append("wPrizeSfnew:").append(wPrizeSfnew.value!=null?wPrizeSfnew:"").append(" ").append("wPrizeFileid:").append(wPrizeFileid.value!=null?wPrizeFileid:"").append(" ").append("wPrizeDetailFj:").append(wPrizeDetailFj.value!=null?wPrizeDetailFj:"").append(" ").append("wPrizeDetail:").append(wPrizeDetail.value!=null?wPrizeDetail:"").append(" ");
		return str.toString();
	}
	
}
